local blaze = require "blaze"
local game = require "club.threecard.sudoku"

local M = {}

local log = blaze.logging.get("ingame")

M.state = {
    selected = nil
    -- {
        -- 当前选中的对局详情信息
        -- id = "5ee7172bdccc4c4a7157ebb9",
        -- players = {
        --     {
        --         user_id = 1,
        --         head = "",
        --         nickname = "123"
        --     },
        --     {
        --         user_id = 2,
        --         head = "",
        --         nickname = "456"
        --     }
        -- },
        -- room_config_id = 13004,
        -- created = 1592203051,
        -- updated_at = 1592203051,
        -- expired_at = 1592375851,
        -- sessions = {
        --     {
        --         id = 1,
        --         status = 0,
        --         state = {}
        --     },
        --     {
        --         id = 2,
        --         status = 0,
        --         state = {}
        --     },
        --     {
        --         id = 3,
        --         status = 0,
        --         state = {}
        --     },
        --     {
        --         id = 4,
        --         status = 0,
        --         state = {}
        --     },
        --     {
        --         id = 5,
        --         status = 0,
        --         state = {}
        --     }
        -- }
    -- }
}

M.mutations = {
    -- 选中指定的对局信息
    select = function(store, state, versus)
        state.selected = versus
        store.emit("选中")
    end
}

return M